package day1;

public class Demo3 {
    public static void main(String[] args) {
//        m1(0);
        try{

            m2(0);
//            return;
//            System.exit(0);
        }catch (Exception e){
            System.out.println(e.getMessage());
            e.printStackTrace();
            System.out.println("有异常");
        }finally {
            System.out.println("我死活都要执行");
        }

        System.out.println(".....");
    }

    static void m2(int i){
        if(i==0){
            throw new RuntimeException("叶哈哈磊");
        }
    }




    static void m1(int i) {
        if(i==0){
            try {
                throw new Exception();
            } catch (Exception e) {
                e.printStackTrace();
            }
        }
    }

    static void regist(String password){

    }
}
